package br.com.gaspar.mb;

import gov.sefaz.framework.modelo.IBaseBO;
import gov.sefaz.utils.exception.BaseException;
import gov.sefaz.visao.jsf.ManagedBeanBase;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;

import br.com.gaspar.bo.iface.IGasparBO;
import br.com.gaspar.entidade.UF;

@Named("UFMB")
@SessionScoped
public class UFMB extends ManagedBeanBase<UF> {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@EJB
	private IGasparBO<UF> bo;
	
	@Override
	protected IBaseBO<UF> getFachada() {
		return bo;
	}

	@Override
	protected void criarAntes() throws BaseException {
		entidade = new UF();
		super.criarAntes();
	}
	
	@PostConstruct
	@Override
	public void iniciar() {
		entidade = new UF();
		super.iniciar();
	}
}
